package javaStudy.算法;

import java.util.Scanner;

public class 回文字符串 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        while (true){
            String next = sc.next();
            if (pd(next)){
                System.out.println("是回文");
            }else {
                System.out.println("不是回文");
            }
            if (next.equals("end")){
                break;
            }
        }


    }
    public static boolean pd(String  str){
        int length = str.length()-1;
        int i=0;
        while (i<length){
            if (str.charAt(i)!=str.charAt(length)){
                return false;
            }
            i++;
            length--;
        }
        return true;
    }
}
